#include <iostream>

using namespace std;

// 使用命令行工具查看 类的对象模型
// cl /d1 reportSingleClassLayoutPerson .\main.cpp
class Animal {
public:
	static int s_a;
	int age;
	int getAgeR() {
		return ageR;
	}
private:
	int ageR = 99;
};
class Person: public Animal {
public:
	static int s_a;
	int name;
};
int Animal::s_a = 0;
int Person::s_a = 1;
void test() {
	Person p;
	p.age = 10;
	p.name = 9;
	cout << "p.age is "<< p.age << endl;
	cout << "p.name is " << p.name << endl;
	cout << "p.ageR is " << p.getAgeR() << endl;
	cout << "person size is " << sizeof(p) << endl;
	
	cout << "p.s_a = " << p.s_a << endl;
	cout << "p.Animal::s_a = " << p.Animal::s_a << endl;
}
int main() {
	test();
	return 0;
}